package com.wwu.system.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wwu.common.constant.CommConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统字典实体
 * @author 一蓑烟雨
 * @date  2023-07-04
 * @version  1.0.0
 */
@Data
@Accessors(chain = true)
@TableName("sys_dict")
@ApiModel(value="SysDict:系统字典实体", description="系统字典实体")
public class SysDict implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "项目编码")
    @JSONField(ordinal = 1)
    @TableId(value = "dict_id",type = IdType.INPUT)
    private String dictId;

    @ApiModelProperty(value = "项目名称")
    @JSONField(ordinal = 2)
    @TableField("dict_name")
    private String dictName;

    @ApiModelProperty(value = "项目类型编码")
    @JSONField(ordinal = 3)
    @TableField("dict_type_id")
    private String dictTypeId;

    @ApiModelProperty(value = "排序码")
    @JSONField(ordinal = 4)
    @TableField("dict_sort")
    private Integer dictSort;

    @ApiModelProperty(value = "是否启用(0:启用；1:作废)")
    @JSONField(ordinal = 5)
    @TableField("dict_status")
    private Integer dictStatus;

    @ApiModelProperty(value = "其他编码")
    @JSONField(ordinal = 6)
    @TableField("other_code")
    private String otherCode;

    @ApiModelProperty(value = "备注")
    @JSONField(ordinal = 7)
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "拼音码")
    @JSONField(ordinal = 8)
    @TableField("py")
    private String py;

    @ApiModelProperty(value = "五笔码")
    @JSONField(ordinal = 9)
    @TableField("wb")
    private String wb;

    @ApiModelProperty(value = "删除状态(0:逻辑未删除；1:逻辑已删除)")
    @JSONField(ordinal = 10)
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    @JSONField(ordinal = 11)
    @TableField(value = "creator",fill = FieldFill.INSERT)
    private String creator;

    @ApiModelProperty(value = "创建时间")
    /** 格式化后台和前端显示样式 */
    @DateTimeFormat(pattern = CommConst.DATE_TIME)
    @JsonFormat(pattern = CommConst.DATE_TIME,timezone = CommConst.TIME_ZONE)
    @JSONField(ordinal = 12)
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    @JSONField(ordinal = 13)
    @TableField(value = "modifier",fill = FieldFill.INSERT_UPDATE)
    private String modifier;

    @ApiModelProperty(value = "修改时间")
    /** 格式化后台和前端显示样式 */
    @DateTimeFormat(pattern = CommConst.DATE_TIME)
    @JsonFormat(pattern = CommConst.DATE_TIME,timezone = CommConst.TIME_ZONE)
    @JSONField(ordinal = 14)
    @TableField(value = "modify_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;
}
